<template>
	<div class="subpage buystatus">
		<div class="content">
			<div class="status-imgbox">
				<img src="@/assets/img/home_img20.png" alt="">
			</div>
			<p class="text1">发布求购成功！</p>
			<p class="text2">求购总重量：{{paySuccessData.totalWeight}}kg</p>
			<p class="text3">单价：{{paySuccessData.salesPrice}}{{paySuccessData.salesPriceUnit}}</p>
			<div class="btn-box">
				<div class="button" @click="tohome">返回首页</div>
				<div class="button" @click="toDetail">查看订单</div>
			</div>
		</div>
	</div>
</template>

<script>
	
	export default {
		data(){
			return {
				paySuccessData: {}
			}
		},
		created(){
			this.paySuccessData = JSON.parse(this.$route.query.item);
			console.log(this.paySuccessData)
		},
		methods: {
			// 返回首页
			tohome(){
				this.$router.replace({
					path: '/'
				})
			},
			toDetail(id){
				this.$router.replace({
					path: '/my/buyOrder/tab1detail/' + this.paySuccessData.wantCattleId
				})
			},
		}
	}
	
</script>

<style lang="scss" scoped>
	.buystatus{
		z-index: 99;
		.content{
			padding-bottom: 24px;
			.status-imgbox{
				margin-top: 60px;
				text-align: center;
				margin-bottom: 22px;
				img{
					width: 144px;
					margin-right: 20px;
				}
			}
			.text1{
				font-size: 20px;
				color: #344047;
				font-weight: 500;
				text-align: center;
				margin-bottom: 16px;
			}
			.text2{
				font-size: 16px;
				color: #5D6164;
				text-align: center;
				margin-bottom: 10px;
			}
			.text3{
				color: #969C9E;
				text-align: center;
				margin-bottom: 48px;
			}
			.btn-box{
				display: flex;
				justify-content: space-between;
				padding: 0 49px;
				.button{
					width: 120px;
					height: 36px;
					line-height: 36px;
					border: 1px solid #31BC8D;
					color: #31BC8D;
					border-radius: 30px;
					text-align: center;
					font-size: 16px;
				}
			}
		}
	}
</style>
